--顺受
local shunshou = fk.CreateSkill {
    name = "mcdh_shunshou",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

shunshou:addEffect(fk.TargetConfirmed,{
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill(self.name) and target == player and data.card.type ~= Card.TypeEquip and
                not table.contains(player:getTableMark("@shunshou-turn"), data.card:getTypeString() .. "_char")
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        local mark = player:getTableMark("@shunshou-turn")
        table.insert(mark, data.card:getTypeString() .. "_char")
        room:setPlayerMark(player, "@shunshou-turn", mark)
        player:drawCards(1, self.name)
    end
})

shunshou:addEffect('prohibit',{
    prohibit_use = function(self, player, card)
        return player:getMark("@shunshou-turn") ~= 0 and
                table.contains(player:getTableMark("@shunshou-turn"), card:getTypeString() .. "_char")
    end
})

Fk:loadTranslationTable {
    ["mcdh_shunshou"] = "顺受",
    [":mcdh_shunshou"] = "每回合每种类型限一次，当你成为基本牌或锦囊牌的目标后，你可以令你本回合不能使用此类型的牌,然后摸一张牌。",
}

return shunshou